<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改诗歌</title>
</head>
<body>
    {% if error_msg %}
    <div class="alert alert-danger">{{ error_msg }}</div>
    {% endif %}
    <div class="container">
        <h1>修改诗歌</h1>
        <form method="post" action="{% url 'svc_edit' poem.id %}">
            {% csrf_token %}
            <div class="form-group">
                <label for="title">标题:</label>
                <input type="text" id="title" name="title" value="{{ poem.title }}" required>
            </div>
            <div class="form-group">
                <label for="content">内容:</label>
                <textarea id="content" name="content" rows="10" required>{{ poem.content }}</textarea>
            </div>
            <button type="submit" class="btn btn-primary">保存修改</button>
        </form>
        <a href="{% url 'index' %}" class="btn btn-secondary">返回列表</a>
    </div>
</body>
</html>